<template>
  <view class="body">
    <view class="report_select">
      <view class="report_select_item">
        <image class="report_img" src="https://ainengli.hzjrsw.com/jkhx/report_inspect.png" />
        <view class="report_type">
          <view class="title">检验报告</view>
          <view class="detail">检验报告，随时阅</view>
        </view>
        <view class="look" @tap="toList('inspect')">查看</view>
      </view>
      <view class="report_select_item">
        <image class="report_img" src="https://ainengli.hzjrsw.com/jkhx/report_check.png" />
        <view class="report_type">
          <view class="title">检查报告</view>
          <view class="detail">检查报告，随时阅</view>
        </view>
        <view class="look" @tap="toList('check')">查看</view>
      </view>
      <view class="report_select_item">
        <image class="report_img" src="https://ainengli.hzjrsw.com/jkhx/report_physical.png" />
        <view class="report_type">
          <view class="title">体检报告</view>
          <view class="detail">体检报告，随时阅</view>
        </view>
        <view class="look" @tap="toList('physical')">查看</view>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
const toList = (type: string) => {
  if (type === 'physical') {
    uni.navigateTo({
      url: '/packA/pages/report/physicalList'
    })
  } else {
    uni.navigateTo({
      url: '/packA/pages/report/list?type=' + type
    })
  }
}
</script>

<style lang="scss" scoped>
.body {
  padding: 24rpx 32rpx;
  box-sizing: border-box;
  background: #f3f7f8;
  .report_select {
    .report_select_item {
      background: #fff;
      border-radius: 16rpx;
      padding: 32rpx;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 24rpx;
      margin-bottom: 24rpx;
      .report_img {
        width: 88rpx;
        height: 88rpx;
      }
      .report_type {
        width: 386rpx;
        text-align: left;
        .title {
          font-weight: 500;
          font-size: 32rpx;
          color: #222222;
        }
        .detail {
          font-weight: 400;
          font-size: 28rpx;
          color: #999999;
          margin-top: 8rpx;
        }
      }
      .look {
        width: 100rpx;
        height: 56rpx;
        line-height: 56rpx;
        text-align: center;
        font-weight: 400;
        font-size: 26rpx;
        color: #00d1b6;
        border-radius: 28rpx;
        box-sizing: border-box;
        border: 1rpx solid #00d1b6;
      }
    }
  }
}
</style>
